/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __IMPL_MGR_H__
#define __IMPL_MGR_H__

namespace xos_jsp
{

    class mgr : public http::i_servlet_mgr
    {
    public:
        typedef xos::release_impl<mgr> T;

    public:
        mgr();
        ~mgr();

    public:
        static int static_init( xos_container::i_container * pContainer, http::i_servlet_mgr ** ppv );
        static xos_container::i_container* container();
        static mgr * get();

    public:
        http::i_servlet * create( const char * lpszName );
        const char * path();
        const char * uri();
        const char * id();

    protected:
        std::string m_path;
        std::string m_uri;
        std::string m_id;

    public:
        int put_back_to_pool();
        int init();
        int term();

    };

} // xos_jsp

#endif // __IMPL_MGR_H__
